from .condition import Condition


class Disjunction(Condition):
    
    def __init__(self):
        Condition.__init__(self)
        self.__conditions = []
        
    def add_condition(self, cond):
        self.__conditions.append(cond)
        
    def _is_true(self, scope):
        for cond in self.__conditions:
            if cond.is_true(scope):
                return True
        return False
